/*
 * enc_save.h
 *
 *  Created on: 2018年11月3日
 *  Author: Degang.Wu (windragon@126.com)
 *  Desc:
 */


#ifndef __HIENC_SAVE_H__
#define __HIENC_SAVE_H__
#include "enc_shrm.h"

//version
#define KEY_INITED		"inited"
#define KEY_APPVER		"appver"
#define KEY_SET_VER		"setver"
#define KEY_SAVE_VER	"savever"
#define KEY_CURVER		"curver"

// dev set
#define KEY_ETH_DEV		"ethdev"
#define KEY_ETH_NUM		"ethnum"
#define KEY_ETH_NAME	"name"
#define	 KEY_ETH_IPADDR	"ipaddr"

//eth io
#define KEY_ETHIO		"ethio"
#define KEY_ETHID		"ethid"
#define KEY_ENABLE		"enable"
#define KEY_SIPADDR		"sipaddr"
#define KEY_DIPADDR		"dipaddr"
#define KEY_SIPPORT		"sipport"
#define KEY_DIPPORT		"dipport"

//video set
#define KEY_VID_SET		"vid_set"
#define KEY_V_CODEC		"codec"
#define KEY_V_PROFILE	"profile"
#define KEY_V_LEVEL		"level"
#define KEY_V_RCTYPE	"rctype"
#define KEY_V_WIDTH		"width"
#define KEY_V_HEIGHT	"height"
#define KEY_V_BITRATE	"bitrate"

#define KEY_V_BIT_FLU   "fluctuate"
#define KEY_V_BIT_MIN	"bitmin"
#define KEY_V_BIT_MAX	"bitmax"
#define KEY_V_GOPSIZE	"gopsize"
#define KEY_V_FPSNUM	"fpsnum"
#define KEY_V_FPSDEN	"fpsden"
#define KEY_V_DAR		"dar"

//osd set
#define KEY_OSD_SET		"osd_set"
#define KEY_OSD_ENABLE	"enable"
#define KEY_OSD_TYPE	"type"
#define KEY_OSD_CFG		"cfg"
#define KEY_OSD_TMSET	"tmset"
#define KEY_OSD_TM_WEEKDAY	"weekday"
#define KEY_OSD_START_TM	"start_sec"
#define KEY_OSD_END_TM		"end_sec"

// logo sest
#define KEY_LOGO_SET	"logo_set"
#define KEY_LOGO_URL	"url"
#define KEY_LOGO_OPACITY	"opacity"
#define KEY_LOGO_NUM	"num"
#define KEY_LOGO_WIDTH	"width"
#define KEY_LOGO_HEIGHT		"height"
#define KEY_LOGO_X		"x"
#define KEY_LOGO_Y		"y"
#define KEY_LOGO_MOVDIR		"movdir"
#define KEY_LOGO_MOVSPEED	"movspeed"

// sub set
#define KEY_SUB_SET			"sub_set"
#define KEY_SUB_CONTENET	"content"
#define KEY_SUB_FONT		"font"
#define KEY_SUB_FONTSIZE	"fontsize"
#define KEY_SUB_FONTSTYLE	"fontstyle"
#define KEY_SUB_X			"x"
#define KEY_SUB_Y			"y"
#define KEY_SUB_FONTCOLOR	"fontcolor"
#define KEY_SUB_BACKCOLOR	"backcolor"
#define KEY_SUB_MOVDIR		"movdir"
#define KEY_SUB_MOVSPEED	"movspeed"

// qr set
#define KEY_QR_SET			"qr_set"
#define KEY_QR_URL			"url"
#define KEY_QR_OPACITY		"opacity"
#define KEY_QR_WIDTH		"width"
#define KEY_QR_HEIGHT		"height"
#define KEY_QR_X			"x"
#define KEY_QR_Y			"y"

//audio set
#define KEY_AUD_SET		"aud_set"
#define KEY_A_CODEC		"codec"
#define KEY_A_VOL		"vol"
#define KEY_A_BITRATE	"bitrate"
#define KEY_A_SMP_RATE	"samplerate"
#define KEY_A_SMP_FMT 	"samplefmt"
#define KEY_A_CHN		"channel"

// ts set
#define KEY_TS_SET		"tsset"
#define KEY_SERVICE_NAME	"srv_name"
#define KEY_PROVIDER_NAME	"prd_name"
#define KEY_PMT_PID		"pmt_pid"
#define KEY_SERVICE_ID	"srv_id"
#define KEY_PCR_PID		"pcr_pid"
#define KEY_VID_PID		"vid_pid"
#define KEY_AUD_PID		"aud_pid"
#define KEY_PCR_INTERVAL_MS		"pcr_ms"
#define KEY_MUXRATE		"muxrate"

// enc channel
#define KEY_CHL_SET		"chlset"
#define KEY_CHL_ISRUN	"isrun"
#define KEY_CHL_ISIN_MPTS	"isin_mpts"

// ip input
#define KEY_IP_INPUT		"ipinput"
#define KEY_IPIN_ENABLE		"enable"
#define KEY_IPIN_IGMP		"igmp"
#define KEY_IPIN_PROTO		"proto"

// output
#define KEY_ENC_OUTPUT		"enc_out"
#define KEY_MUX_OUTPUT		"mux_out"
#define KEY_OUT_PROTO		"proto"
#define KEY_OUT_FILTER_NULL_PKT		"nullpkt"
#define KEY_OUT_ENABLE_IP		"enable_ip"
#define KEY_OUT_ENABLE_ASI		"enable_asi"

// mux
#define KEY_MUX_SET		"muxset"
#define KEY_MUX_RATE	"muxrate"
#define KEY_MUX_ORG_NETID	"org_nid"
#define KEY_MUX_NETID		"nid"
#define KEY_MUX_TRANSID		"transid"
#define KEY_MUX_PCR_CORRECT	"pcr_correct"

#ifdef __cplusplus
	extern "C" {
#endif

void shrmem_enc_load_mst(pENC_DEVSET_MASTER pMaster);
void shrmem_enc_load_slv(pENC_DEVSET_SLAVE pSlave);

void shrmem_enc_save_mst(pENC_DEVSET_MASTER pMaster);
void shrmem_enc_save_slv(pENC_DEVSET_SLAVE pSlave);

void shrmem_encchl_save(pENC_CHLSET pchlset, int idx);
void shrmem_encchl_load(pENC_CHLSET pchlset, int idx);


#ifdef __cplusplus
}
#endif

#endif
